import { axios } from "../../utils/request";

const api = {
  List: "/in/unitGroup/list",
  Save: "/in/unitGroup/save",
  DELETE: "/in/unitGroup/delete"
};

/**
 * 获取计量单位分组列表
 */
export function unitGroupList(parameter) {
  return axios({
    url: api.List,
    method: "get",
    params: parameter,
    timeout: 500000,
  });
}

  /**
   * 新增/修改计量单位分组
   * @param {*} data
   */
  export function saveUnitGroup(data) {
    console.log(data);
    return axios({
      url: api.Save,
      method: "post",
      data: data
    });
  }
  
  /**
   * 删除计量单位分组
   */
  export function deleteUnitGroup(data) {
    return axios({
      url: api.DELETE,
      method: "post",
      data: data
    });
  }